//引入封装好的get/post
import { get, post } from './index'

// 获取首页商品信息
export const getIndexgoods = () => get('/getindexgoods')
// 新人专享
export const getNew = () => get('/getnew')

// 秒杀
export const getSeckill = () => get('/getseckill')

// 万人团
export const getGroupon = () => get('/getgroupon')

// 优惠券
export const getCoupon = () => get('/getcoupon')

//封装一个登录
export const Login = data => post('/login', data)

//封装一个注册事件
export const register = data => post('/register', data)

//封装一个轮播图接口
export const getBanner = () => get('/getbanner')

// 封装购物车列表接口
export const cartList = (params) => get("/cartlist", params);
// 购物车添加
export const cartadd = (data) => post("/cartadd", data);
// 购物车删除
export const delCart = (data) => post("/cartdelete", data);
// 商品详情
export const getgoodsinfo=(params)=>get('/getgoodsinfo',params);
// 分类列表
export const getcate=(params)=>get('/getcate',params);
//分类商品
export const getgoods=(params)=>get('/getgoods',params);
// 获取分类商品
export const getGoods = () => get("/getgoods");

